using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class Patient_LevelMap : EntityTypeConfiguration<Patient_Level>
    {
        public Patient_LevelMap()
        {
            // Primary Key
            this.HasKey(t => t.Patient_Level_Id);

            // Properties
            this.Property(t => t.create_by)
                .HasMaxLength(20);

            this.Property(t => t.update_by)
                .HasMaxLength(20);

            this.Property(t => t.Patient_id)
                .HasMaxLength(20);

            this.Property(t => t.Hypertension_One)
                .HasMaxLength(2);

            this.Property(t => t.Hypertension_Two)
                .HasMaxLength(1);

            this.Property(t => t.Hypertension_Three)
                .HasMaxLength(1);

            // Table & Column Mappings
            this.ToTable("Patient_Level");
            this.Property(t => t.Patient_Level_Id).HasColumnName("Patient_Level_Id");
            this.Property(t => t.create_by).HasColumnName("create_by");
            this.Property(t => t.create_time).HasColumnName("create_time");
            this.Property(t => t.update_by).HasColumnName("update_by");
            this.Property(t => t.update_time).HasColumnName("update_time");
            this.Property(t => t.Patient_id).HasColumnName("Patient_id");
            this.Property(t => t.Follow_up_id).HasColumnName("Follow_up_id");
            this.Property(t => t.Hypertension_One).HasColumnName("Hypertension_One");
            this.Property(t => t.Hypertension_Two).HasColumnName("Hypertension_Two");
            this.Property(t => t.Hypertension_Three).HasColumnName("Hypertension_Three");
        }
    }
}
